package com.ld.poetry.aigc.codegeex.gclu.unittest;


import org.junit.Assert;
import org.junit.jupiter.api.Test;

public class StringUtilsTest {

    @Test
    public void testReverse() {
        String result = StringUtils.reverse("hello");
        Assert.assertEquals("olleh", result);
    }

    @Test
    public void testIsPalindrome() {
        boolean result = StringUtils.isPalindrome("madam");
        Assert.assertTrue(result);
    }

    @Test
    public void testIsNotPalindrome() {
        boolean result = StringUtils.isPalindrome("abcde");
        Assert.assertFalse(result);
    }

    @Test
    public void testCapitalize() {
        String result = StringUtils.capitalize("hello world");
        Assert.assertEquals("Hello World", result);
    }

    @Test
    public void testEmptyInput() {
        String result = StringUtils.capitalize("");
        Assert.assertEquals("", result);
    }
}
